[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
New Allocates Memory for Dynamic Variables
New(var P : <pointer>);
Allocates memory from the heap for P^ and assigns that address to P.
The amount of memory allocated is exactly the size of the item in
which P is a pointer to.
Notes: To deallocate memory, use either Dispose or
Mark/Release, but do NOT use a combination of these
two techniques.
The contents of the memory allocated are not
initialized to any particular value.
-------------------------------- Example ---------------------------------
var
P : ^Integer; { P is a pointer to an integer }
New(P); { Allocate space for 1 integer }
See Also:
Dispose
Mark
Release
GetMem
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson